<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <base href="${request.contextPath}/"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <title>互联网+农业云</title>
    <script src="js/jquery-1.11.1.min.js"></script>
    <script src="js/common_click.js"></script>
    <script src="js/echarts.min.js"></script>

    <link rel="stylesheet" href="css/cqjc.css">
    <link rel="stylesheet" href="css/common.css">
    <link rel="stylesheet" href="lib/time_select/time.css">
    <link href="layui/css/layui.css" rel="stylesheet"/>
    <script src="lib/time_select/jquery_002.js"></script>
    <script src="lib/time_select/jquery_003.js"></script>

    <link rel="stylesheet" href="lib/jqueryPagination/css/jquery.pagination.css"/>
    <link rel="stylesheet" href="css/fenye.css">
    <script src="js/fenye.js"></script>

    <script src="lib/jqueryPagination/js/jquery.pagination.min.js"></script>
    <script src="layui/layerutil.js"></script>
    <script src="layui/layui.all.js"></script>

</head>
<body>

<!--图表-->
<div class="content_all">
    <div class="content">
        <div class="cqjc_txt">
            <script>
                $(function () {

                    $('.date_picker').date_input();

                })
            </script>
            <span>虫情检测</span>
            <!--时间搜索插件-->
            <div class="cqjc_ss">
                <img src="images/search.png" onclick="chaxun()">
            </div>
            <div style=" width:240px;;float: right;border: 1px solid #1c7dfa; height: 40px;">
               <!-- <input id="obtime"
                       style="text-align: center;letter-spacing: 2px;width: 226px;background: none;border: none;font-size: 14px;color: white;border-radius: 3px;height: 40px;"
                       class="date_picker" value="" type="text">
                <div class="date_selector" style="display: none; top: 105.05px; left: 710px;">
                    <div class="nav"><p class="month_nav"><span class="button prev" title="[Page-Up]">«</span> <span
                            class="month_name">六月份</span> <span class="button next" title="[Page-Down]">»</span></p>
                        <p class="year_nav"><span class="button prev" title="[Ctrl+Page-Up]">«</span> <span
                                class="year_name">2018</span> <span class="button next"
                                                                    title="[Ctrl+Page-Down]">»</span></p></div>
                </div>-->
                <div class="layui-form">
                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <div class="layui-input-inline">
                                <input  type="text" class="layui-input" id="obtime"    style=" text-align: center;letter-spacing: 2px;width: 226px;background: none;border: none;font-size: 14px;color: white;border-radius: 3px;height: 40px;">
                            </div>
                        </div>
                    </div>
                </div>
                <input type="hidden" name="current" id="current" value="${current!'1'}">
                <input type="hidden" name="titleNum" id="titleNum" value="${titleNum}">
            </div>


        </div>
        <div class="cqjc_table_all">
            <table style="border-collapse:collapse;">
                <tr>
                    <th>采集位置</th>
                    <th>虫名</th>
                    <th>数量（头）</th>
                    <th>密度（头/亩）</th>
                    <th>观测员</th>
                    <th>观测时间</th>
                    <th>图片</th>
                </tr>
                <#list listall as list>
                    <tr>
                        <td>${list.collection}</td>
                        <td>${list.insect}</td>
                        <td>${list.insectNumber}</td>
                        <td>${list.density}</td>
                        <td>${list.oBservatory}</td>
                        <td>${list.oBservationTime}</td>
                        <td><a onclick="chakan('${list.photo}')"><span class="table_button">查看</span></a></td>
                    </tr>

                </#list>
            </table>
            <div class="content_fy">
                <div class="box">
                    <div id="pagination3" class="page fl"></div>
                    <div class="info fl">
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

</body>
</html>
<script>
    $(function () {
        $("#pagination3").pagination({
            currentPage: 1,
            totalPage: 16,
            isShow: true,
            count: 10,
            homePageText: "首页",
            endPageText: "尾页",
            prevPageText: "上一页",                                                                                                                                                                                                                                                               
            nextPageText: "下一页",
            callback: function (current) {
                var obtime = $('#obtime').val();
                parent.tiaozhuan(obtime, current);
            }
        });
        var current = $('#current').val() - 0;
        var titleNum = $('#titleNum').val() - 0;
        $("#pagination3").pagination("setPage", current, titleNum);
    });
    /*function check(obtime) {
        var obtime = $('#obtime').val();
        parent.tiaozhuan(type, title, 1);
    }*/
</script>

<script>
    $(function () {

        $(".cqjc_table_all table tr").height($(".cqjc_table_all").height() / 10)
    })


    function layerutil(title, url, w, h) {
        layer_show(title, url, w, h);
    }

    function chakan(e) {
        layerutil("查看图片", "${request.contextPath}/cqjc/chakan.html?ywId=" + e, 800, 600);
    }

    function chaxun() {
        var obtime = $('#obtime').val();
        parent.tiaozhuan(obtime, 1);
    }
</script>

<script>
    layui.use('laydate', function() {
        var laydate = layui.laydate;

        //常规用法
        laydate.render({
            elem: '#obtime'
        });
    });
</script>


